<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>Performance Recommandations</title>
		<link type="text/css" rel="stylesheet" href="PLUGINS_ROOT/org.polarsys.capella.doc/html/styles.css"/>
	</head>
	<body>
		<h1 id="Capella_Performance_Recommandations">Capella Performance Recommandations</h1>
		<h2 id="Desynchronize_semantic_browser">Desynchronize semantic browser</h2>
		<p>By default, the Semantic Browser is always synchronized with the current selection in the Diagram Editor or in the Project Explorer.  </p>
		<p>However, with big models and diagrams, performing all the requests might introduce lag between selections of graphical elements and make the whole environment significantly less reactive. It is possible to deactivate this synchronization, toggling off the related toolbar view button , and only relying on the F9 shortcut when needed. To work with Semantic Browser with better performance, it is possible to deactivate the Show diagram  /Show Pattern options since computation of all related diagrams and pattern instances for an element is time-consuming. </p>
		<p>
			<img height="450" width="800" border="0" src="Images/Perf_REC1.png"/>
			<br/>
		</p>
		<h2 id="Deactivate_diagram_automatic_refreshes">Deactivate diagram automatic refreshes</h2>
		<p>Rely on manual refreshing of diagrams instead of on automatic one. In Capella main menu, select Window\Preferences\Sirius and deactivate “Do refresh on representation opening” &amp; “Automatic Refresh” options.</p>
		<p>When necessary, update representations refreshing them manually with diagram toolbar button

			<img height="25" width="25" border="0" src="Images/Perf_REC2.png"/>.
			<br/>
		</p>
		<p>
			<img height="500" width="650" border="0" src="Images/Perf_REC3.png"/>
			<br/>
		</p>
		<h2 id="Diagram_and_Properties_view_customizations">Diagram and Properties view customizations</h2>
		<h3 id="Deactivate_transfer_viewer_automatic_expand">Deactivate transfer viewer automatic expand</h3>
		<p>In order to avoid the systematic unfolding of element trees, select Window\Preferences\Capella\Transfer Viewer in the main menu and deactivate all choices in “Multiple Selection Dialog” and in “Single Selection Dialog”.</p>
		<h3 id="Disable_transfer_viewer_label_computation">Disable transfer viewer label computation</h3>
		<p>In order to show up the dialog faster, it is recommended for huge models to disable the label computation for model elements. Instead of the custom label, the name of the element will be displayed. When the object is not a named element, its meta-class name will be displayed.</p>
		<p>
			<img height="500" width="650" border="0" src="Images/Perf_REC4.png"/>
			<br/>
		</p>
		<h2 id="Filter_Project_explorer_model_elements">Filter Project explorer model elements</h2>
		<p>Hiding technical and “useless” elements in the tree helps have a clearer vision of the model main elements.
			<br/> In the Project Explorer view toolbar \Customize View…\Filters, check technical model elements to be hidden.
		</p>
		<p>
			<img height="750" width="650" border="0" src="Images/Perf_REC6.png"/>
			<br/>
		</p>
		<h2 id="Set_diagram_unsynchronized">Set diagram unsynchronized</h2>
		<p>Unsynchronizing diagrams allows a better control on the elements that are displayed. For example, one should consider unsynchronizing a diagram instead of relying too much on the “Hide Element” functionality. Note that hidden elements are saved in representation and, if they are not necessary and never unmasked, they make aird files significantly and degrade performances at diagram opening.</p>
		<p>Check “Unsynchronized” option by right clicking on diagram background: Additional palette tools will appear to insert new diagram elements which would be automatically inserted in default “Synchronized” mode (e.g. Functional Exchanges in dataflow diagrams …).</p>
		<p>In “Unsynchronized” mode, diagrams are updated step by step using additional palette tools: It avoids having to hide some elements afterwards. For example, when a diagram is unsynchronized, the Ports of a Function will not be displayed automatically.</p>
		<p>See dedicated User Manual section Advanced Management of Diagrams.</p>
		<p>
			<img height="500" width="500" border="0" src="Images/Perf_REC7.png"/>
			<br/>
		</p>
		<h2 id="Avoid_source_control_when_generating_HTML_documentation_add-on">Avoid source control when generating HTML documentation add-on</h2>
		<p>Capella html documentation add-on generates too many external files in a SCM context. It is advised to run this generation outside a SCM context in order to avoid Capella ClearCase adapter freeze. However the result can be zipped and added to source control.</p>
		<p>Moreover, during documentation generation within workspace, one should temporally disable SCM synchronization delay in main toolbar \Window\Preferences\Capella\SCM.</p>
		<p>
			<img height="500" width="600" border="0" src="Images/Perf_REC8.png"/>
			<br/>
		</p>
		<h2 id="In_clearcase_SCM_context.2C_focus_on_snapshot_view">In clearcase SCM context, focus on snapshot view</h2>
		<p>In ClearCase SCM context, local snapshot views avoid network delays occurring with dynamic views.</p>
		<p>See dedicated Model Configuration Management guidelines</p>
		<h2 id="Fragment_Capella_Model">Fragment Capella Model</h2>
		<p>Fragment Capella models to avoid Capella files (*.capella, *.aird, *.capellafragment, *.airdfragment) to be larger than about 50 MB.</p>
		<h2 id="Adapt_capella.ini_configuration">Adapt capella.ini configuration</h2>
		<h3 id="JVM_Tuning">JVM Tuning</h3>
		<h4 id="Heap_Size">Heap Size</h4>
		<p>When a Capella starts, Java Virtual Machine gets some memory from Operating System. Java Virtual Machine or JVM uses this memory for all its need and part of this memory is called Java Heap Memory. Whenever we create object using new operator or by any another means, object is allocated memory from Heap and when object dies or garbage collected, memory goes back to Heap space in Java.</p>
		<table>
			<tr>
				<th style="text-align:left;">JVM Option</th>
				<th style="text-align:left;">Meaning</th>
				<th style="text-align:left;">Default Value</th>
			</tr>
			<tr>
				<td>Xms</td>
				<td>Initial java heap size</td>
				<td>1000m</td>
			</tr>
			<tr>
				<td>Xmx</td>
				<td>Maximum java heap size</td>
				<td>3000m</td>
			</tr>
		</table>
		<p>You can always adapt these values to your machine specification and model size, by modifying the 
			<b>capella.ini</b> file.
		</p>
		<p>A different approach is to create a new shortcut of 
			<b>capella.exe</b> and pass the updated arguments and values directly in the 
			<b>target</b> field of its 
			<b>properties</b> like so:  
			<b>-vm "C:\...\Java\...\bin\javaw.exe" -clean -vmargs -Xms128m –Xmx1208m</b>.
		</p>
		<h4 id="Stack_Size">Stack Size</h4>
		<p>Each thread in the JVM get’s a stack. The stack size will limit the number of threads that you can have. Using a too big stack size will augment the risk to run into an out of memory exception as each thread is allocated more memory than it needs.</p>
		<table>
			<tr>
				<th style="text-align:left;">JVM Option</th>
				<th style="text-align:left;">Meaning</th>
				<th style="text-align:left;">Default Value</th>
			</tr>
			<tr>
				<td>Xss</td>
				<td>Stack size for each thread</td>
				<td>4m</td>
			</tr>
		</table>
		<p>In case your model contains nested elements on a lot of levels, a StackOverFlow exception can occur in functional transition for example (see the “Error Log” view). To avoid this, you can increase the stack size. Please check the previous 
			<b>Heap Size</b> section for more information in regards to the file that you should modify.
		</p>
		<h2 id="Create_AIRD_analysis_and_isolate_table_representation">Create AIRD analysis and isolate table representation</h2>
		<p>Create separated representation analysis (aird files) and isolate Table representation.</p>
		<p>
			<img height="350" width="700" border="0" src="Images/Perf_REC10.png"/>
			<br/>
		</p>
		<h2 id="Close_outline_view">Close outline view</h2>
		<p>This view may cause performance issues on big diagrams. It can be closed and reopen when necessary through Capella main toolbar \Window\Show View.</p>
		<p>
			<img height="400" width="300" border="0" src="Images/Perf_REC11.png"/>
			<br/>
		</p>
		<p>The Outline view can be hidden at Capella initialization using the preference /instance/org.polarsys.capella.core.preferences/hide.view.outline=true in an preference file.</p>
		<p>(look at Capella Guide / User Manual / Workbench Basics / Capella Configurability)</p>
		<h2 id="Customize_enabled_validation_rules">Customize enabled validation rules</h2>
		<p>For instance, disable temporally pattern, cycles checks or others, in the main menu Window\Preferences\Model Validation\Constraints.</p>
		<p>
			<img height="450" width="700" border="0" src="Images/Perf_REC12.png"/>
			<br/>
		</p>
		<h2 id="Deactivate_option_checking_model_version_at_session_opening">Deactivate option checking model version at session opening</h2>
		<p>Capella main toolbar \Window\Preferences\Capella and deactivate “Check model version at load time” option.</p>
		<p>
			<img height="450" width="700" border="0" src="Images/Perf_REC13.png"/>
			<br/>
		</p>
		<h2 id="Customize_MDE_reporting_preferences">Customize MDE reporting preferences</h2>
		<p>In Capella main menu, open Window\Preferences\MDE Reporting and deactivate some choices.</p>
		<p>
			<img height="350" width="600" border="0" src="Images/Perf_REC14.png"/>
			<br/>
		</p>
		<h2 id="Deactivate_model_change_recorder">Deactivate model change recorder</h2>
		<p>Disabled by default.</p>
		<p>In Capella main menu Window\Preferences\Capella\Model Change Recorder, deactivate “Activate model change recording”.</p>
		<p>
			<img height="450" width="700" border="0" src="Images/Perf_REC15.png"/>
			<br/>
		</p>
		<h2 id="Deactivate_option_showing_delete_wizard">Deactivate option showing delete wizard</h2>
		<p>In Capella main menu \Window\Preferences\Capella\Delete, deactivate option “Confirm deletions”.</p>
		<p>
			<img height="450" width="700" border="0" src="Images/Perf_REC16.png"/>
			<br/>
		</p>
		<h2 id="Deactivate_project_explorer_link_with_editors">Deactivate project explorer link with editors</h2>
		<p>Disabled by default.</p>
		<p>
			<img height="180" width="350" border="0" src="Images/Perf_REC17.png"/>
			<br/>
		</p>
		<h2 id="Close_properties_view_in_case_that_only_pop-up_wizard_are_used_to_edit_the_model">Close properties view in case that only pop-up wizard are used to edit the model</h2>
		<p>
			<img height="400" width="800" border="0" src="Images/Perf_REC18.png"/>
			<br/>
		</p>
	</body>
</html>